<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%
  content_for :page_title, join_title(t(:page_title, "Web Conferences"), @context.name)
  js_bundle :conferences
  css_bundle :conferences
%>

<h1 class="screenreader-only">{{#t}}Conferences{{/t}}</h1>

<% if can_do(WebConference.new(:context => @context), @current_user, :create) %>
  <div class="ic-Action-header ic-Action-header--before-item-groups">
    <div class="ic-Action-header__Secondary">
      <button type="button" class="btn btn-primary new-conference-btn" title="{{#t}}New Conference') %>" aria-label="<%= t(:new_conference, 'New Conference{{/t}}">
        {{> icons/plus}}
        {{#t}}Conference{{/t}}
      </button>
    </div>
  </div>
<% end %>

<div class="item-group-container item-box">

  <div class="item-group-condensed">
    <div class="ig-header">
      <h2 class="ig-header-title">
        <a
          class="element_toggler accessible-toggler"
           href="#"
           aria-label= "{{#t}}New Conferences{{/t}}"
           aria-controls="new-conference-list"
           aria-expanded="true">
          {{> icons/mini-arrow-down}}
          {{#t}}New Conferences{{/t}}
        </a>
      </h2>
    </div>
    <div class="item-group-expandable" id="new-conference-list"></div>
  </div>

  <div class="item-group-condensed">
    <div class="ig-header">
      <h2 class="ig-header-title">
        <a
            class="element_toggler accessible-toggler"
            href="#"
            aria-label= "{{#t}}Concluded Conferences{{/t}}"
            aria-controls="concluded-conference-list"
            aria-expanded="true">
          {{> icons/mini-arrow-down}}
          {{#t}}Concluded Conferences{{/t}}
        </a>
      </h2>
    </div>
    <div class="item-group-expandable" id="concluded-conference-list"></div>
  </div>

</div>

<div id="add_conference_form"></div>
